﻿<%@ Page Title="" Language="C#" MasterPageFile="~/common/AfterLogin.master" AutoEventWireup="true" CodeFile="RewardConvertion.aspx.cs" Inherits="product_card_user_RewardConvertion" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="html_css" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="html_js" Runat="Server">
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
            height: 23px;
        }
        .style3
        {
            height: 23px;
            width: 193px;
        }
        .style4
        {
            width: 193px;
            height: 25px;
        }
        .style5
        {
            width: 193px;
            height: 28px;
        }
        .style6
        {
            height: 28px;
        }
        .style7
        {
            height: 25px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="leftMenu" Runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="content" Runat="Server">

    <p>
        &nbsp;<asp:Label ID="Label11" runat="server" Text="Label"></asp:Label>
        <br />
        <br />
        <br />
        <fieldset>
        <legend style="color: #FF0000">Reward Convertion</legend>
            <br />
            <asp:Label ID="Label9" runat="server" Font-Italic="True" Font-Size="Medium" 
                ForeColor="Red"></asp:Label>
            <br />
            <br />
            <br />
            <asp:Label ID="Label12" runat="server" Text="Payment" Visible="False"></asp:Label>
            <br />
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Label 
                ID="Label7" runat="server" Text="Cash"></asp:Label>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:TextBox 
                ID="TextBox7" runat="server" Enabled="False">0</asp:TextBox>
            <br />
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Label ID="Label8" runat="server" Text="Reward"></asp:Label>
&nbsp;&nbsp;&nbsp;&nbsp; <asp:TextBox ID="TextBox1" runat="server" Enabled="False">0</asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Button1" runat="server"  Text="Add details" 
                Width="144px" onclick="Button1_Click"  />
&nbsp;&nbsp;
            <asp:Button ID="Button4" runat="server" onclick="Button4_Click" 
                Text="Convert" />
            <br />
            <br />
            <br />
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <table class="style1" 
                 border ="5" bordercolor= "FF3333" >
                <tr>
                    <td class="style3">
                        Date</td>
                    <td class="style2">
                        Reward points
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        <asp:Label ID="Label1" runat="server"></asp:Label>
                    </td>
                    <td class="style7">
                        <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style5">
                        <asp:Button ID="Button3" runat="server" onclick="Button3_Click" 
                            Text="Add converted details" style="height: 26px" />
                    </td>
                    <td class="style6">
                        <asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="Reset" />
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Button ID="Reward" runat="server" onclick="Reward_Click" Text="Reward" />
                    </td>
                </tr>
            </table>
            <br />
                        <asp:Label ID="Label10" runat="server" Visible="False"></asp:Label>
             <br />
            <br />
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                
                SelectCommand="SELECT [date], [reward], [Type], [spendAmount] FROM [calculateReward] WHERE ([custID] = @custID)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="TextBox6" Name="custID" PropertyName="Text" 
                        Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
            <br />
 
            <br />
            <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" CellPadding="4" 
                DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
                AllowSorting="True">
                <AlternatingRowStyle BackColor="White" />
                <Columns>
                    <asp:BoundField DataField="date" HeaderText="date" SortExpression="date" />
                    <asp:BoundField DataField="reward" HeaderText="reward" 
                        SortExpression="reward" />
                    <asp:BoundField DataField="Type" HeaderText="Type" 
                        SortExpression="Type" />
                    <asp:BoundField DataField="spendAmount" HeaderText="spendAmount" 
                        SortExpression="spendAmount" />
                </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
            </asp:GridView>
            <br />
            <br />
            <br />
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                SelectCommand="SELECT * FROM [calculateReward]"></asp:SqlDataSource>
            <br />
            <br />
            <br />
            <br />
            <asp:TextBox ID="TextBox6" runat="server" Visible="False"></asp:TextBox>
            <br />
            <asp:TextBox ID="TextBox4" runat="server" Enabled="False" Visible="False"></asp:TextBox>
            <br />
            <asp:TextBox ID="TextBox5" runat="server" Enabled="False" Visible="False"></asp:TextBox>
            <br />
            </fieldset>
        
   </p>
</asp:Content>

